package com.hoppi;

/**
 * <p>
 * 创建日期：2021-07-31 11:19
 *
 * @author Hoppinging
 * @version 1.1
 * @since 1.0
 */
public class Test {
    public static void main(String[] args) {
        MyLinkedStack<String> stack = new MyLinkedStack<>();
        try{
            stack.pop();
        } catch (MyLinkedStack.PopException e) {
            e.printStackTrace();
        }
        stack.push("Hello");
        stack.push("World");
        stack.push("Hi");
        stack.printTop();
        stack.print();
        try {
            System.out.println(stack.pop());
        } catch (MyLinkedStack.PopException e) {
            e.printStackTrace();
        }
        try {
            System.out.println(stack.pop());
        } catch (MyLinkedStack.PopException e) {
            e.printStackTrace();
        }
        try {
            System.out.println(stack.pop());
        } catch (MyLinkedStack.PopException e) {
            e.printStackTrace();
        }
        if(stack.isEmpty()){
            System.out.println("The stack is Empty.");
        }
    }
}
